{extend name="index/index"}
{block name="lunbo"}
<link rel="stylesheet" type="text/css" href="/static/index/detail/css/im.css" />
<link rel="stylesheet" type="text/css" href="/static/index/detail/css/1a87f502837c44f488d5e660e77a5e1a.css" />
<link type="text/css" rel="stylesheet" href="/static/index/detail/date/css/calendar.min.css" />
<br/>
<br/>
<br/>
<br/>
<!--详情图片开始-->
<div style="width:43%;height:400px;margin-left:19.5%;">
   <img src="/uploads/housepic/{:str_replace('\','/',$result.house_pic)}" style="width:100%;height:400px;"/>

</div>
<!--详情图片结束-->


<div class="m-cont m-con-fluid">
    <div class="m-hotel-info">
        <div class="hotel-cont">
            <div class="room-info">
                <!--房子的名字-->
                <h1>{$result.house_name}</h1>
                <div class="district-info">
                    <!--地址标识-->
                    <i class="icon-area"></i>
                    <!--房屋地址-->
                    <span class="lab-text">{$result.house_address}</span>

                    <a href="http://map.baidu.com/" class="link-btn">查看地图</a>
                </div>

                <div class="book-info" style="float:right;">

                    <button type="submit" class="btn" form='myfom'>预定</button>
                    <br/>
                    <br/>
                    <div id="bestProduct" class="price-info" style="color:red;font-size: 20px;">价格: ￥{$result.houseprice}元/天</div>

                </div>


            </div>
        </div>
    </div>
</div>




<!-- 开始    2015-10-19  -->
<div class="m-cont t-cont clearfix">
    <div id="unitmaincontainer" class="main-cont " style="margin:0 auto;">
        <!-- 产品  -->
        <div class="m-column-box new-column-box" id="saleproductsection">
            <div class="product-filter" id="productfilter">
                <form id="myfom" action="{:url('index/order/index',['id'=>$result['id']])}" method="post">

                    <div class="date-change-box">
                        <div class="change-control-group">
                            <span class="controls-span">入住</span>
                            <div class="controls">
                                <label for="unitDetailStartDate">
                                    <input type="text" id="unitDetailStartDate" name="input_date" class="date-ipt-text" calendar="YYYY-MM-DD " value="{$time1}" /><i class="icon-date"></i>
                                </label>
                            </div>
                        </div>

                        <div class="change-control-group">
                            <span class="controls-span">退房</span>
                            <div class="controls">
                                <label for="unitDetailEndDate">
                                    <input type="text" calendar="YYYY-MM-DD " name="out_date" id="unitDetailEndDate" class="date-ipt-text" value="{$time2}"/><i class="icon-date t-icon-date"></i>
                                </label>
                            </div>
                        </div>

                    </div>
                </form>

            </div>
        </div>

        <!--标题一房屋详情-->
        <div class="m-column-box ">
            <div id="HouseTabs" class="house-tabs-box">
                <div id="contentTab" class="house-tabs ">
                    <ul>
                        <li id="unitdetailinfotab" class="current item-first">
                            <a href="#unitdetailinfo">房屋详情</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!--标题一房屋详情结束-->

        <div class="m-column-box t-column-box" id="unitdetailinfo">
            <!-- 设施服务  PS:设施与服务数据合并  -->
            <div class="column-info">
                <div class="side-box">
                    <i class="icon-facility"></i>
                    <h2>设施服务</h2>
                </div>
                <div class="content-box">
                    <div id="facilitycontainer" class="m-key-list">
                        <h4>居家</h4>
                        <ul style="max-height:35px;">
                            {volist name="houseserver" id="v"}
                            <li class="">{$v.f_name}</li>
                            {/volist}
                        </ul>

                        <h4>卫浴</h4>
                        <ul style="max-height:35px;">
                            {volist name="bathserver" id="v"}
                            <li class="">{$v.f_name}</li>
                            {/volist}
                        </ul>
                        <h4>餐厨</h4>
                        <ul style="max-height:35px;">
                            {volist name="wasteserver" id="v"}
                            <li class="">{$v.f_name}</li>
                            {/volist}
                        </ul>
                    </div>
                </div>
            </div>
        </div>


        <!-- 入住须知  -->
        <div id="unitcheckinneedtoknow" class="m-column-box rule-cont">

            <div class="m-column-tit t-column-tit clearfix" id="unitIntro">
                <h2>入住须知</h2>
            </div>
            <div class="column-info">
                <div class="side-box">
                    <i class="icon-hint"></i>
                    <h2>入住提示</h2>
                </div>
                <div class="content-box">
                    <div id="facilitycontainer" class="m-key-list">
                    <h4>推荐入住人数</h4>
                    <ul style="max-height:35px;">
                        {volist name="total" id="v"}
                        <li class="">{$v.f_name}</li>
                        {/volist}
                    </ul>

                    <h4>提供</h4>
                    <ul style="max-height:35px;">
                        {volist name="provide" id="v"}
                        <li class="">{$v.f_name}</li>
                        {/volist}
                    </ul>

                        <h4>多久对房间清扫一次</h4>
                        <ul style="max-height:35px;">
                            {volist name="clean" id="v"}
                            <li class="">{$v.f_name}</li>
                            {/volist}
                        </ul>
                    </div>
                </div>
            </div>

        </div>



        <div id="commentsArea" class="m-column-box">
            <a name="comment" id="comment" href="#comment"></a>
            <div class="m-column-tit t-column-tit clearfix" id="commentsArea">
                <h2 id="commentsTitle">本房屋点评（<b>1</b>条）</h2>
                <div class="point-info" rel="j-experience-info">
                    发点评送福利<i class="icon-desc-text"></i>
                </div>
            </div>
            <div class="cont-info">
                <div class="m-comment-cont" id="detailcommentwraper">

                </div>
            </div>
            <br>
            <!--评论-->

            {if @$info1[0] != $result.house_name}
            <div class="row">
                <div class="col-md-1">
                    <img src="/static/assets/images/gallery/thumb-4.jpg" style="width:40px; height:40px;"  alt="..." class="img-circle">
                </div>
                <div class="col-md-4">暂无评论</div>
            </div>
            {else}
            {volist name="comment" id="vo"}
            <div class="row">
                <div class="col-md-1">
                    <img src="/static/assets/images/gallery/thumb-4.jpg" style="width:40px; height:40px;"  alt="..." class="img-circle">
                </div>
                <div class="col-md-5">
                    {$vo.input_person_name}
                    <div class="row">
                        <div class="col-md-12">{$vo.commentinfo}</div>
                    </div>
                </div>
                <div class="col-md-5">
                    {$vo.comment_time}
                </div>
            </div>

            <div class="row">
                <div class="col-md-1"></div>
                <div class="col-md-7 ">
                    <div class="list-group">
                        <a href="#" class="list-group-item active showcomment">
                            {volist name="reply" id="v"}
                            {if $v.comment_id == $vo.id}
                            <h4 class="list-group-item-heading">回复：</h4>
                            <p class="list-group-item-text">{$v.reply}</p>
                            {else}
                            {/if}
                            {/volist}
                        </a>
                        <div class="row">
                            <div class="col-md-3" id="hodereply" ><button >收起回复</button></div>
                            <div class="col-md-3" id="showreply" style="display:none"><button >查看回复</button></div>
                        </div>
                    </div>
                </div>

            </div>

            {/volist}
            {/if}

        </div>


    </div> <!--unitmaincontainer-->



    <!--侧边栏-->
    <div class="sidebar-cont">
        <div class="m-column-box t-column-box">

            <div class="sidebar-hd sidebar-hd-new"><h2>房东信息</h2></div>
            <div class="m-listing-cont">
                <div class="hotel-info" id="hotelmanagementcompanycontent">
                    <p class="contact-info">联系人：<span id="name">{$result.link_name}</span></p>
                    <div class="shop-rate">
                        <p class="contact-info">联系电话：<span id="link_phone">点击查看号码</span></p>
                    </div>
                </div>



            </div>
        </div>
    </div>
</div>

<!--点击查看号码用ajax请求-->
<script>
   $(function(){
       var link_name = $('#name').html();

       $('#link_phone').click(function(){
           $.ajax({
               url : '/house/linkphone',
               type : 'post',
               data : {'link_name':link_name},
               dateType : 'json',
               success : function(data){
                   if(data){
                       $('#link_phone').html(data);
                   }
               },
               error : function(){
                   alert('ajax请求失败');
               }
           })
       })
   })

</script>


<!--收起查看回复的点击事件-->
<script>
    $('.list-group').delegate('#hodereply','click',function(){
        $(this).parents('.list-group').children('.showcomment ').slideToggle();
        $(this).siblings().css('display','block');
        $(this).css('display','none');


    });
$('.list-group').delegate('#showreply','click',function(){
    $(this).parents('.list-group').children('.showcomment ').slideToggle();
    $(this).siblings().css('display','block');
    $(this).css('display','none');
});
</script>


<script type="text/javascript" src="/static/index/detail/date/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/static/index/detail/date/js/calendar.js"></script>




{/block}